package com.ruoyi.yanjing.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yanjing.mapper.OverdueAlertMapper;
import com.ruoyi.yanjing.domain.OverdueAlert;
import com.ruoyi.yanjing.service.IOverdueAlertService;

/**
 * 逾期未处置预警Service业务层处理
 * 
 * @author whz
 * @date 2024-12-07
 */
@Service
public class OverdueAlertServiceImpl implements IOverdueAlertService 
{
    @Autowired
    private OverdueAlertMapper overdueAlertMapper;

    /**
     * 查询逾期未处置预警
     * 
     * @param id 逾期未处置预警主键
     * @return 逾期未处置预警
     */
    @Override
    public OverdueAlert selectOverdueAlertById(Long id)
    {
        return overdueAlertMapper.selectOverdueAlertById(id);
    }

    /**
     * 查询逾期未处置预警列表
     * 
     * @param overdueAlert 逾期未处置预警
     * @return 逾期未处置预警
     */
    @Override
    public List<OverdueAlert> selectOverdueAlertList(OverdueAlert overdueAlert)
    {
        return overdueAlertMapper.selectOverdueAlertList(overdueAlert);
    }

    /**
     * 新增逾期未处置预警
     * 
     * @param overdueAlert 逾期未处置预警
     * @return 结果
     */
    @Override
    public int insertOverdueAlert(OverdueAlert overdueAlert)
    {
        overdueAlert.setCreateTime(DateUtils.getNowDate());
        return overdueAlertMapper.insertOverdueAlert(overdueAlert);
    }

    /**
     * 修改逾期未处置预警
     * 
     * @param overdueAlert 逾期未处置预警
     * @return 结果
     */
    @Override
    public int updateOverdueAlert(OverdueAlert overdueAlert)
    {
        overdueAlert.setUpdateTime(DateUtils.getNowDate());
        return overdueAlertMapper.updateOverdueAlert(overdueAlert);
    }

    /**
     * 批量删除逾期未处置预警
     * 
     * @param ids 需要删除的逾期未处置预警主键
     * @return 结果
     */
    @Override
    public int deleteOverdueAlertByIds(Long[] ids)
    {
        return overdueAlertMapper.deleteOverdueAlertByIds(ids);
    }

    /**
     * 删除逾期未处置预警信息
     * 
     * @param id 逾期未处置预警主键
     * @return 结果
     */
    @Override
    public int deleteOverdueAlertById(Long id)
    {
        return overdueAlertMapper.deleteOverdueAlertById(id);
    }
}
